class Cache {
    constructor() {
        this.services = {};
        this.routeRules = {};
    }
    /**
     * 根据服务名获取对应缓存
     * @param  {} serviceName
     */
    getService(serviceName) {
        return this.services[serviceName];
    }
    /**
     * 根据servicename设置缓存
     * @param  {} key
     * @param  {} serviceArray
     */
    setService(serviceName, serviceArray) {
        this.services[serviceName] = serviceArray;
    }

    setRouteRule(path,roueConfig) {
        this.routeRules[path] = roueConfig;
    }

    getRouteRule(path) {
        return this.routeRules[path];
    }

    clear() {
        console.log(111);
    }
}

module.exports = new Cache();